#include<unistd.h>  
#include<stdio.h> 
#include<unistd.h>   
  
  
int main(void)  
{  
    int i,pid;
    pid = fork();  
    if (pid < 0) {  
        perror("fork failed");  
        exit(1);  
    }  
else{
	if(fork==0)  
        printf(" ID  childs: %d\n", getpid());  
        else
         printf(" ID  parent : %d\n", getpid() );  }
}     
